-
Notifications
You must be signed in to change notification settings - Fork 43
Call spawn() on a background thread because it might block #158
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
87269bf
to
fd53084
Compare
fd53084
to
4d58af5
Compare
Introduce runOnBackgroundThread() to run closures on a background thread without blocking the Swift Concurrency thread pool
4d58af5
to
334e6c3
Compare
334e6c3
to
58445d9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
testWriteToClosedPipe is failing - I think this is another one of those cases that is fundamentally impossible to test, since the fd could be pointing to anything by the time you try to write to it.
Agreed. I'll disable this test |
…we can't safely write to / read from a closed fd
9074cbf
to
0faf723
Compare
Introduce
runOnBackgroundThread()
to run closures on a background thread without blocking the Swift Concurrency thread pool.On Darwin,
runOnBackgroundThread()
usesDispatchQueue
; on Linux and Windows, it uses a single thread in the work loop.Resolves: #85